Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add RTS and DTR to SerialUSB #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cyber-murmel
Copy link

I find the control lines to be useful for out-of-band signalling e.g. for resetting a program while sending raw data as bytes over serial.

For example in this USB to OLED sketch.

#include <DigiCDC.h>
#include <DigisparkOLED.h>

void setup()
{
    SerialUSB.begin();
    oled.begin();
}

void loop()
{
    static bool rts_old = false;
    bool rts = false;

    if (SerialUSB.available()) {
        char c = SerialUSB.read();
        oled.ssd1306_send_data_byte(c);
    }

    rts = SerialUSB.getRTS();
    if (rts_old != rts) {
        rts_old = rts;
        oled.clear();
    }
}

Is this a feature you would like to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant